package com.xyzq.model.sm;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.appfuse.model.BaseObject;
import org.appfuse.model.User;

@Entity
@Table(name = "depository_business")
public class DepositoryBusiness extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3650622055502931083L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "FK_USER_USER", nullable = false)
	private User user;
	//Account
	private Integer accountOpen;
	private Integer accountClose;
	private Integer accountActive;
	private Integer accountClearPW;
	private Integer accountAlterInfo;
	private Integer accountAlterCommission;
	private Integer accountAlterAuth;
	private Integer accountAlterAgent;
	private Integer accountDepositoryBank;
	private Integer accountStockFreeze;
	private Integer accountAntiMoney;
	private Integer accountMTSSCredit;
	private Integer accountMTSSOpen;
	private Integer accountDataScan;
	private Integer accountTSSW;
	private Integer accountOldVisit;
	// Fund
	private Integer fundOpen;
	private Integer fundClose;
	private Integer fundAlter;
	// Stock
	private Integer stockSpecify;
	private Integer stockCancel;
	private Integer stockTransfer;
	private Integer stockOpen;
	private Integer stockClose;
	private Integer stockAlter;
	private Integer stockConfirmThirdBoard;
	private Integer stockReOpen;
	private Integer stockUseNew;
	private Integer stockUseClose;
	private Integer stockUseQuery;
	// Other
	private Integer dynamicCode;
	private Integer ibOpen;
	private Integer goldKyln;
	private Integer managerMoneyAFA;
	private Integer publicTransaction;
	
	private String remark;
	@Temporal(TemporalType.DATE)
	private Date workDate;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "sub_time")
	private Date subTime;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "modify_time")
	private Date modifyTime;

	@Override
	public String toString() {
		ToStringBuilder builder = new ToStringBuilder(this);
		builder.append("id", id);
		builder.append("user", user);
		builder.append("accountOpen", accountOpen);
		builder.append("accountClose", accountClose);
		builder.append("accountActive", accountActive);
		builder.append("accountClearPW", accountClearPW);
		builder.append("accountAlterInfo", accountAlterInfo);
		builder.append("accountAlterCommission", accountAlterCommission);
		builder.append("accountAlterAuth", accountAlterAuth);
		builder.append("accountAlterAgent", accountAlterAgent);
		builder.append("accountDepositoryBank", accountDepositoryBank);
		builder.append("accountStockFreeze", accountStockFreeze);
		builder.append("accountAntiMoney", accountAntiMoney);
		builder.append("accountMTSSCredit", accountMTSSCredit);
		builder.append("accountMTSSOpen", accountMTSSOpen);
		builder.append("accountDataScan", accountDataScan);
		builder.append("accountTSSW", accountTSSW);
		builder.append("accountOldVisit", accountOldVisit);
		builder.append("fundOpen", fundOpen);
		builder.append("fundClose", fundClose);
		builder.append("fundAlter", fundAlter);
		builder.append("stockSpecify", stockSpecify);
		builder.append("stockCancel", stockCancel);
		builder.append("stockTransfer", stockTransfer);
		builder.append("stockOpen", stockOpen);
		builder.append("stockClose", stockClose);
		builder.append("stockAlter", stockAlter);
		builder.append("stockConfirmThirdBoard", stockConfirmThirdBoard);
		builder.append("stockReOpen", stockReOpen);
		builder.append("stockUseNew", stockUseNew);
		builder.append("stockUseClose", stockUseClose);
		builder.append("stockUseQuery", stockUseQuery);
		builder.append("dynamicCode", dynamicCode);
		builder.append("ibOpen", ibOpen);
		builder.append("goldKyln", goldKyln);
		builder.append("managerMoneyAFA", managerMoneyAFA);
		builder.append("publicTransaction", publicTransaction);
		builder.append("remark", remark);
		builder.append("workDate", workDate);
		builder.append("subTime", subTime);
		builder.append("modifyTime", modifyTime);
		return builder.toString();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((accountActive == null) ? 0 : accountActive.hashCode());
		result = prime
				* result
				+ ((accountAlterAgent == null) ? 0 : accountAlterAgent
						.hashCode());
		result = prime
				* result
				+ ((accountAlterAuth == null) ? 0 : accountAlterAuth.hashCode());
		result = prime
				* result
				+ ((accountAlterCommission == null) ? 0
						: accountAlterCommission.hashCode());
		result = prime
				* result
				+ ((accountAlterInfo == null) ? 0 : accountAlterInfo.hashCode());
		result = prime
				* result
				+ ((accountAntiMoney == null) ? 0 : accountAntiMoney.hashCode());
		result = prime * result
				+ ((accountClearPW == null) ? 0 : accountClearPW.hashCode());
		result = prime * result
				+ ((accountClose == null) ? 0 : accountClose.hashCode());
		result = prime * result
				+ ((accountDataScan == null) ? 0 : accountDataScan.hashCode());
		result = prime
				* result
				+ ((accountDepositoryBank == null) ? 0 : accountDepositoryBank
						.hashCode());
		result = prime
				* result
				+ ((accountMTSSCredit == null) ? 0 : accountMTSSCredit
						.hashCode());
		result = prime * result
				+ ((accountMTSSOpen == null) ? 0 : accountMTSSOpen.hashCode());
		result = prime * result
				+ ((accountOldVisit == null) ? 0 : accountOldVisit.hashCode());
		result = prime * result
				+ ((accountOpen == null) ? 0 : accountOpen.hashCode());
		result = prime
				* result
				+ ((accountStockFreeze == null) ? 0 : accountStockFreeze
						.hashCode());
		result = prime * result
				+ ((accountTSSW == null) ? 0 : accountTSSW.hashCode());
		result = prime * result
				+ ((dynamicCode == null) ? 0 : dynamicCode.hashCode());
		result = prime * result
				+ ((fundAlter == null) ? 0 : fundAlter.hashCode());
		result = prime * result
				+ ((fundClose == null) ? 0 : fundClose.hashCode());
		result = prime * result
				+ ((fundOpen == null) ? 0 : fundOpen.hashCode());
		result = prime * result
				+ ((goldKyln == null) ? 0 : goldKyln.hashCode());
		result = prime * result + ((ibOpen == null) ? 0 : ibOpen.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((managerMoneyAFA == null) ? 0 : managerMoneyAFA.hashCode());
		result = prime * result
				+ ((modifyTime == null) ? 0 : modifyTime.hashCode());
		result = prime
				* result
				+ ((publicTransaction == null) ? 0 : publicTransaction
						.hashCode());
		result = prime * result + ((remark == null) ? 0 : remark.hashCode());
		result = prime * result
				+ ((stockAlter == null) ? 0 : stockAlter.hashCode());
		result = prime * result
				+ ((stockCancel == null) ? 0 : stockCancel.hashCode());
		result = prime * result
				+ ((stockClose == null) ? 0 : stockClose.hashCode());
		result = prime
				* result
				+ ((stockConfirmThirdBoard == null) ? 0
						: stockConfirmThirdBoard.hashCode());
		result = prime * result
				+ ((stockOpen == null) ? 0 : stockOpen.hashCode());
		result = prime * result
				+ ((stockReOpen == null) ? 0 : stockReOpen.hashCode());
		result = prime * result
				+ ((stockSpecify == null) ? 0 : stockSpecify.hashCode());
		result = prime * result
				+ ((stockTransfer == null) ? 0 : stockTransfer.hashCode());
		result = prime * result
				+ ((stockUseClose == null) ? 0 : stockUseClose.hashCode());
		result = prime * result
				+ ((stockUseNew == null) ? 0 : stockUseNew.hashCode());
		result = prime * result
				+ ((stockUseQuery == null) ? 0 : stockUseQuery.hashCode());
		result = prime * result + ((subTime == null) ? 0 : subTime.hashCode());
		result = prime * result + ((user == null) ? 0 : user.hashCode());
		result = prime * result
				+ ((workDate == null) ? 0 : workDate.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DepositoryBusiness other = (DepositoryBusiness) obj;
		if (accountActive == null) {
			if (other.accountActive != null)
				return false;
		} else if (!accountActive.equals(other.accountActive))
			return false;
		if (accountAlterAgent == null) {
			if (other.accountAlterAgent != null)
				return false;
		} else if (!accountAlterAgent.equals(other.accountAlterAgent))
			return false;
		if (accountAlterAuth == null) {
			if (other.accountAlterAuth != null)
				return false;
		} else if (!accountAlterAuth.equals(other.accountAlterAuth))
			return false;
		if (accountAlterCommission == null) {
			if (other.accountAlterCommission != null)
				return false;
		} else if (!accountAlterCommission.equals(other.accountAlterCommission))
			return false;
		if (accountAlterInfo == null) {
			if (other.accountAlterInfo != null)
				return false;
		} else if (!accountAlterInfo.equals(other.accountAlterInfo))
			return false;
		if (accountAntiMoney == null) {
			if (other.accountAntiMoney != null)
				return false;
		} else if (!accountAntiMoney.equals(other.accountAntiMoney))
			return false;
		if (accountClearPW == null) {
			if (other.accountClearPW != null)
				return false;
		} else if (!accountClearPW.equals(other.accountClearPW))
			return false;
		if (accountClose == null) {
			if (other.accountClose != null)
				return false;
		} else if (!accountClose.equals(other.accountClose))
			return false;
		if (accountDataScan == null) {
			if (other.accountDataScan != null)
				return false;
		} else if (!accountDataScan.equals(other.accountDataScan))
			return false;
		if (accountDepositoryBank == null) {
			if (other.accountDepositoryBank != null)
				return false;
		} else if (!accountDepositoryBank.equals(other.accountDepositoryBank))
			return false;
		if (accountMTSSCredit == null) {
			if (other.accountMTSSCredit != null)
				return false;
		} else if (!accountMTSSCredit.equals(other.accountMTSSCredit))
			return false;
		if (accountMTSSOpen == null) {
			if (other.accountMTSSOpen != null)
				return false;
		} else if (!accountMTSSOpen.equals(other.accountMTSSOpen))
			return false;
		if (accountOldVisit == null) {
			if (other.accountOldVisit != null)
				return false;
		} else if (!accountOldVisit.equals(other.accountOldVisit))
			return false;
		if (accountOpen == null) {
			if (other.accountOpen != null)
				return false;
		} else if (!accountOpen.equals(other.accountOpen))
			return false;
		if (accountStockFreeze == null) {
			if (other.accountStockFreeze != null)
				return false;
		} else if (!accountStockFreeze.equals(other.accountStockFreeze))
			return false;
		if (accountTSSW == null) {
			if (other.accountTSSW != null)
				return false;
		} else if (!accountTSSW.equals(other.accountTSSW))
			return false;
		if (dynamicCode == null) {
			if (other.dynamicCode != null)
				return false;
		} else if (!dynamicCode.equals(other.dynamicCode))
			return false;
		if (fundAlter == null) {
			if (other.fundAlter != null)
				return false;
		} else if (!fundAlter.equals(other.fundAlter))
			return false;
		if (fundClose == null) {
			if (other.fundClose != null)
				return false;
		} else if (!fundClose.equals(other.fundClose))
			return false;
		if (fundOpen == null) {
			if (other.fundOpen != null)
				return false;
		} else if (!fundOpen.equals(other.fundOpen))
			return false;
		if (goldKyln == null) {
			if (other.goldKyln != null)
				return false;
		} else if (!goldKyln.equals(other.goldKyln))
			return false;
		if (ibOpen == null) {
			if (other.ibOpen != null)
				return false;
		} else if (!ibOpen.equals(other.ibOpen))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (managerMoneyAFA == null) {
			if (other.managerMoneyAFA != null)
				return false;
		} else if (!managerMoneyAFA.equals(other.managerMoneyAFA))
			return false;
		if (modifyTime == null) {
			if (other.modifyTime != null)
				return false;
		} else if (!modifyTime.equals(other.modifyTime))
			return false;
		if (publicTransaction == null) {
			if (other.publicTransaction != null)
				return false;
		} else if (!publicTransaction.equals(other.publicTransaction))
			return false;
		if (remark == null) {
			if (other.remark != null)
				return false;
		} else if (!remark.equals(other.remark))
			return false;
		if (stockAlter == null) {
			if (other.stockAlter != null)
				return false;
		} else if (!stockAlter.equals(other.stockAlter))
			return false;
		if (stockCancel == null) {
			if (other.stockCancel != null)
				return false;
		} else if (!stockCancel.equals(other.stockCancel))
			return false;
		if (stockClose == null) {
			if (other.stockClose != null)
				return false;
		} else if (!stockClose.equals(other.stockClose))
			return false;
		if (stockConfirmThirdBoard == null) {
			if (other.stockConfirmThirdBoard != null)
				return false;
		} else if (!stockConfirmThirdBoard.equals(other.stockConfirmThirdBoard))
			return false;
		if (stockOpen == null) {
			if (other.stockOpen != null)
				return false;
		} else if (!stockOpen.equals(other.stockOpen))
			return false;
		if (stockReOpen == null) {
			if (other.stockReOpen != null)
				return false;
		} else if (!stockReOpen.equals(other.stockReOpen))
			return false;
		if (stockSpecify == null) {
			if (other.stockSpecify != null)
				return false;
		} else if (!stockSpecify.equals(other.stockSpecify))
			return false;
		if (stockTransfer == null) {
			if (other.stockTransfer != null)
				return false;
		} else if (!stockTransfer.equals(other.stockTransfer))
			return false;
		if (stockUseClose == null) {
			if (other.stockUseClose != null)
				return false;
		} else if (!stockUseClose.equals(other.stockUseClose))
			return false;
		if (stockUseNew == null) {
			if (other.stockUseNew != null)
				return false;
		} else if (!stockUseNew.equals(other.stockUseNew))
			return false;
		if (stockUseQuery == null) {
			if (other.stockUseQuery != null)
				return false;
		} else if (!stockUseQuery.equals(other.stockUseQuery))
			return false;
		if (subTime == null) {
			if (other.subTime != null)
				return false;
		} else if (!subTime.equals(other.subTime))
			return false;
		if (user == null) {
			if (other.user != null)
				return false;
		} else if (!user.equals(other.user))
			return false;
		if (workDate == null) {
			if (other.workDate != null)
				return false;
		} else if (!workDate.equals(other.workDate))
			return false;
		return true;
	}

	public Long getId() {
		return id;
	}

	public User getUser() {
		return user;
	}

	public Integer getAccountOpen() {
		return accountOpen;
	}

	public Integer getAccountClose() {
		return accountClose;
	}

	public Integer getAccountActive() {
		return accountActive;
	}

	public Integer getAccountClearPW() {
		return accountClearPW;
	}

	public Integer getAccountAlterInfo() {
		return accountAlterInfo;
	}

	public Integer getAccountAlterCommission() {
		return accountAlterCommission;
	}

	public Integer getAccountAlterAuth() {
		return accountAlterAuth;
	}

	public Integer getAccountAlterAgent() {
		return accountAlterAgent;
	}

	public Integer getAccountDepositoryBank() {
		return accountDepositoryBank;
	}

	public Integer getAccountStockFreeze() {
		return accountStockFreeze;
	}

	public Integer getAccountAntiMoney() {
		return accountAntiMoney;
	}

	public Integer getAccountMTSSCredit() {
		return accountMTSSCredit;
	}

	public Integer getAccountMTSSOpen() {
		return accountMTSSOpen;
	}

	public Integer getAccountDataScan() {
		return accountDataScan;
	}

	public Integer getAccountTSSW() {
		return accountTSSW;
	}

	public Integer getFundOpen() {
		return fundOpen;
	}

	public Integer getFundClose() {
		return fundClose;
	}

	public Integer getFundAlter() {
		return fundAlter;
	}

	public Integer getStockSpecify() {
		return stockSpecify;
	}

	public Integer getStockCancel() {
		return stockCancel;
	}

	public Integer getStockTransfer() {
		return stockTransfer;
	}

	public Integer getStockOpen() {
		return stockOpen;
	}

	public Integer getStockClose() {
		return stockClose;
	}

	public Integer getStockAlter() {
		return stockAlter;
	}

	public Integer getStockConfirmThirdBoard() {
		return stockConfirmThirdBoard;
	}

	public Integer getStockReOpen() {
		return stockReOpen;
	}

	public Integer getStockUseNew() {
		return stockUseNew;
	}

	public Integer getStockUseClose() {
		return stockUseClose;
	}

	public Integer getStockUseQuery() {
		return stockUseQuery;
	}

	public Integer getDynamicCode() {
		return dynamicCode;
	}

	public Integer getIbOpen() {
		return ibOpen;
	}

	public Integer getGoldKyln() {
		return goldKyln;
	}

	public String getRemark() {
		return remark;
	}

	public Date getSubTime() {
		return subTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public void setAccountOpen(Integer accountOpen) {
		this.accountOpen = accountOpen;
	}

	public void setAccountClose(Integer accountClose) {
		this.accountClose = accountClose;
	}

	public void setAccountActive(Integer accountActive) {
		this.accountActive = accountActive;
	}

	public void setAccountClearPW(Integer accountClearPW) {
		this.accountClearPW = accountClearPW;
	}

	public void setAccountAlterInfo(Integer accountAlterInfo) {
		this.accountAlterInfo = accountAlterInfo;
	}

	public void setAccountAlterCommission(Integer accountAlterCommission) {
		this.accountAlterCommission = accountAlterCommission;
	}

	public void setAccountAlterAuth(Integer accountAlterAuth) {
		this.accountAlterAuth = accountAlterAuth;
	}

	public void setAccountAlterAgent(Integer accountAlterAgent) {
		this.accountAlterAgent = accountAlterAgent;
	}

	public void setAccountDepositoryBank(Integer accountDepositoryBank) {
		this.accountDepositoryBank = accountDepositoryBank;
	}

	public void setAccountStockFreeze(Integer accountStockFreeze) {
		this.accountStockFreeze = accountStockFreeze;
	}

	public void setAccountAntiMoney(Integer accountAntiMoney) {
		this.accountAntiMoney = accountAntiMoney;
	}

	public void setAccountMTSSCredit(Integer accountMTSSCredit) {
		this.accountMTSSCredit = accountMTSSCredit;
	}

	public void setAccountMTSSOpen(Integer accountMTSSOpen) {
		this.accountMTSSOpen = accountMTSSOpen;
	}

	public void setAccountDataScan(Integer accountDataScan) {
		this.accountDataScan = accountDataScan;
	}

	public void setAccountTSSW(Integer accountTSSW) {
		this.accountTSSW = accountTSSW;
	}

	public void setFundOpen(Integer fundOpen) {
		this.fundOpen = fundOpen;
	}

	public void setFundClose(Integer fundClose) {
		this.fundClose = fundClose;
	}

	public void setFundAlter(Integer fundAlter) {
		this.fundAlter = fundAlter;
	}

	public void setStockSpecify(Integer stockSpecify) {
		this.stockSpecify = stockSpecify;
	}

	public void setStockCancel(Integer stockCancel) {
		this.stockCancel = stockCancel;
	}

	public void setStockTransfer(Integer stockTransfer) {
		this.stockTransfer = stockTransfer;
	}

	public void setStockOpen(Integer stockOpen) {
		this.stockOpen = stockOpen;
	}

	public void setStockClose(Integer stockClose) {
		this.stockClose = stockClose;
	}

	public void setStockAlter(Integer stockAlter) {
		this.stockAlter = stockAlter;
	}

	public void setStockConfirmThirdBoard(Integer stockConfirmThirdBoard) {
		this.stockConfirmThirdBoard = stockConfirmThirdBoard;
	}

	public void setStockReOpen(Integer stockReOpen) {
		this.stockReOpen = stockReOpen;
	}

	public void setStockUseNew(Integer stockUseNew) {
		this.stockUseNew = stockUseNew;
	}

	public void setStockUseClose(Integer stockUseClose) {
		this.stockUseClose = stockUseClose;
	}

	public void setStockUseQuery(Integer stockUseQuery) {
		this.stockUseQuery = stockUseQuery;
	}

	public void setDynamicCode(Integer dynamicCode) {
		this.dynamicCode = dynamicCode;
	}

	public void setIbOpen(Integer ibOpen) {
		this.ibOpen = ibOpen;
	}

	public void setGoldKyln(Integer goldKyln) {
		this.goldKyln = goldKyln;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public void setSubTime(Date subTime) {
		this.subTime = subTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	

	public void setWorkDate(Date workDate) {
		this.workDate = workDate;
	}

	public Date getWorkDate() {
		return workDate;
	}

	public void setPublicTransaction(Integer publicTransaction) {
		this.publicTransaction = publicTransaction;
	}

	public Integer getPublicTransaction() {
		return publicTransaction;
	}

	public void setAccountOldVisit(Integer accountOldVisit) {
		this.accountOldVisit = accountOldVisit;
	}

	public Integer getAccountOldVisit() {
		return accountOldVisit;
	}

	public void setManagerMoneyAFA(Integer managerMoneyAFA) {
		this.managerMoneyAFA = managerMoneyAFA;
	}

	public Integer getManagerMoneyAFA() {
		return managerMoneyAFA;
	}

}
